<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>缤格</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/swiper.min.css"/>
    <!--<link rel="stylesheet" type="text/css" href="../../script/imgPreview/baguetteBox.css"/>-->
    <link rel="stylesheet" type="text/css" href="../../css/common.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/binge.css"/>
    <script type="text/javascript" src="../../script/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../../script/swiper.min.js"></script>
    <!--<script type="text/javascript" src="../../script/imgPreview/baguetteBox.js"></script>-->
    <!--<script type="text/javascript" src="../../script/imgPreview/highlight.min.js"></script>-->
    <script type="text/javascript" src="../../script/mobile.js"></script>
    <script type="text/javascript">
        window['adaptive'].desinWidth = 750;
        window['adaptive'].baseFont = 28;
        window['adaptive'].maxWidth = 750;
        window['adaptive'].init();
    </script>
</head>


<!--这里body上有个height: 100%;-->
<body>
<!--这里div上有个height: 100%;-->
<div style="overflow-y: scroll; -webkit-overflow-scrolling: touch; height: 100%;">
    <!--可编辑区域-->
    <div contenteditable="true">
        <div>
            <span>This span is contentEditable</span>
        </div><div>
            <span>1、汉桓宽《盐铁论·相刺》：“文学言治尚於 唐 虞 ，言义高於秋天，有华言矣，
                秋之景色
                秋之景色(60张)
                未见其实也。” 北周庾信《小园赋》：“非夏日而可畏，异秋天而可悲。” 前蜀 尹鹗 《菩萨蛮》词：“ 陇 云暗合秋天白，俯窗独坐窥烟陌。”
                2、唐张谔《九日》诗：“秋天林下不知春，一种佳游事也均。”胡适《尝试集·十一月二十四夜》：“现在他们说我快要好了，那幽艳的秋天早已过去了。”
                从中国秋始日期分布图上可以看出，东北地区是中国东部秋始来得最早的地方。进入秋季，北方冷空气不断侵入，但势力不是很强，常在中国北方形成秋高气爽的天气，华西常有绵绵秋雨出现。
                秋季的主要气象灾害有：华西秋雨、南方寒露风、霜冻及低温冷害。总体来讲，进入秋季，太阳高度角渐低，温度渐降；秋风送爽、炎暑顿消、硕果满枝、田野金黄。
                立秋
                立秋是二十四节气中的第13个节气。每年8月7日或8日视太阳到达黄经135°时为立秋。“秋”就是指暑去凉来，意味着秋天的开始。但立秋时节，江淮一带的天气仍十分炎热。
                根据平均温度划分季节的标准，必须是5天的平均温度在22℃以下才算是秋天，按照这样的标准，江淮地区一般是在9月中下旬才进入秋天。立秋后虽然一时暑气难消，还有“秋老虎”的余威，但总的趋势是天气逐渐凉爽。气温的日较差逐渐明显，往往是白天很热，而夜晚却比较凉爽。
                秋的含义，实际上是庄稼快成熟的意思。立秋以后，中国南方大部分地区晚稻拔节孕穗，棉花裂铃吐絮；中稻、夏玉米进入灌浆成熟阶段。华南东部和西部，抗旱、防洪的任务仍然十分艰巨。立秋后的华南，时令虽仍属盛夏，但"立秋十天遍地黄"，一个金色"秋天"就要到来了?
                处暑
                处暑是二十四节气中的第14个节气。“处”是去的意思。处暑即暑气至此而止，也就是到了处暑，炎热的夏季就要过去，气温开始逐渐下降，雨量渐少。但这只是一般规律，在江淮地区，各年的差异很大，有的年份，处暑期间天气的炎热程度比夏日更甚，出现了俗称的“秋老虎”天气，正因为如此，江淮一带地区有将处暑解释为“处在暑日之中”的。故提醒百姓此时既要注意防暑。在北方此时昼夜温差逐步增大，早晚要适时添加衣物，防止感冒。
                昼暖夜凉的条件对农作物体内干物质的制造和积累十分有利，庄稼成熟较快，民间有“处暑禾田连夜变”之说。所以提醒农民朋友根据天气变化，适时安排好田间农事。</span>
    </div>
    </div>
</div>
</body>

</html>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<!--<link rel="stylesheet" type="text/css" href="../../css/zy.media.min.css"/>
<script type="text/javascript" src="../../script/zy.media.min.js"></script>-->
<link rel="stylesheet" type="text/css" href="../../css/mescroll.min.css"/>
<script type="text/javascript" src="../../script/mescroll.min.js"></script>
<script type="text/javascript" src="../../script/clipboard.min.js"></script>

<link rel="stylesheet" type="text/css" href="../../script/videoJs/video-js.min.css"/>
<!--<link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet"  type="text/css"/>-->
<script type="text/javascript" src="../../script/videoJs/video.min.js"></script>
<script type="text/javascript" src="../../script/detailSwiper.js"></script>
<script type="text/javascript" src="../../script/comment.js"></script>


<script type="text/javascript">
    var invitation_id = '';//帖子id
    var circle_id = '';//圈子id
    var member_id = '';//用户id
    var stype = 1;//类型：1显示评论 2显示喜欢
    var hot = 1;//排序：1时间排序 2热度排序
    var page = 1;
    var pullUp = true;
    var _model = $(".model");

    var video_id = 0;
    var msgImg_id = 0;

    var shareTitle = '';//分享title
    var shareInfo = '发现精彩大学生活，更多内容，尽在大学情报局～（分享自大学情报局 App）';//分享info
    var shareImg = 'widget://icon/logo.png';//网络分享图片 -- QQ分享
    apiready = function () {

        setFixStatusBar(); //设置状态栏
        pop.loading()
        keybackListener()
        invitation_id = api.pageParam.invitation_id;


        getInviteDetail()

        SystemCheckVersion()

        api.addEventListener({
            name: 'aite'
        }, function(ret, err) {
            console.log(JSON.stringify(ret));
            var mid = ret.value.id;
            var mname = ret.value.name;
            var mUrl = '../activity/person_index';
            var m_id = {member_id: mid}
            var word = '<span style="display: inline; color: #ff7777;" class="aite" data-id="'+mid+'" onclick=\'commonUrl("'+mUrl+'",'+jsonChange(m_id)+')\'>@'+mname+'</span>　';
            // $("#article").append(word);
            checkSystemType(function () {
                $("#article").append(word);
            },function () {
                _insertimg(word)
            });
        });


    };


    function toAllList() {
        //type: 1新闻，2帖子，3活动贴，4赛事，5战况，6投票，7广场评星
        getAllList(2,invitation_id)
    }


    //二级评论获取评论目标
    var _input = $("#inputContent");
    var _editModel = $(".edit-model");
    var _article = $("#article");
    _input.click(function () {
        _editModel.show();
        var html = _article.html()
        _article.html('').focus();
    });

    function reply(id, name) {
        var pid = id;
        _input.attr('placeholder', '回复：' + name);
        _input.attr('data-pid', pid);
        _editModel.show();
        _article.focus();
        console.log(pid)
    }

    /*_article.blur(function () {
        if (_article.html() == '' || msgImg_id != 0) {
            _input.val('');
            _input.attr('placeholder', '写评论...');
            _input.attr('data-pid', '');
        }
    });*/


    //关闭评论框
    _editModel.on('click', function () {
        _input.val('');
        _input.attr('placeholder', '写评论...');
        _input.attr('data-pid', '');
        _editModel.hide()
    });
    //阻止事件冒泡 关闭评论框
    _editModel.on('click', '.edit-input', function (event) {
        event.stopPropagation()
        /*_article.focus();*/
    });

    //评论
    var addStatus = true;
    function comment_add() {
        var pid = '', type = 2;
        if (_input.attr('data-pid')) {
            pid = _input.attr('data-pid');
            type = 0;
        }
        var uidsArr = [];
        $("#article .aite").each(function () {
            var _this = $(this);
            var _thisId = _this.attr('data-id');
            uidsArr.push(_thisId);
        });
        var param = {
            token: $api.getStorage('token'),
            type: type,//类型：1新闻 2帖子 3活动 0回复 4赛事，5战况，6投票，7广场
            key_id: invitation_id,
            content: _article.html(),
            pid: pid,//当type为0的时候必须传入,二级回复，就是评论的id
            icon: msgImg_id,
            void_id: video_id,
            uids: uidsArr.toString()
        }
        if (!isDefine(param.content)&&!isDefine(param.icon)&&!isDefine(param.void_id)) {
            pop.notice('请发表你的评论内容');
            return false;
        }
        if(addStatus == false){
            return;
        }
        // console.log(jsonChange(param));
        // return;
        pop.loading();
        getAjax(Interface.comment_add, param, function (res) {
            addStatus = false;

            _editModel.hide();
            _article.html('');
            _input.attr('placeholder', '写评论...');
            _input.attr('data-pid', '');

            $("#msgImg").siblings('img').attr('src','').removeAttr('data-id');
            $("#msgImg").hide();
            msgImg_id = 0;
            video_id = 0;

            pop.notice(res.msg)
            pop.close();
            setTimeout(function () {
                page = 1;
                getInviteDetail()
                addStatus = true;
            }, 1500)
        }, function (error) {
            pop.notice(error.msg)
            pop.close();
        })
        _article.blur();//失去焦点
    }





    //举报
    function reportBtn(event) {
        event.stopPropagation()
        var param = {
            type: 3,
            pid: invitation_id,
        }
        commonUrl('../member/jubao', param);
        closeModel()
    }

    //跳转对应圈子
    function toCircle() {
        var param = {
            circle_id: circle_id
        }
        commonUrl('../circle/circle_index', param);
    }

    /*下拉刷新的回调 */
    function downCallback() {
        stype = 1;
        hot = 1;
        page = 1;
        getInviteDetail()

        //mescroll.endErr();
    }

    //创建MeScroll对象
    var mescroll = new MeScroll("mescroll", {
        down: {
            auto: false, //是否在初始化完毕之后自动执行下拉回调callback; 默认true
            callback: downCallback //下拉刷新的回调
        },
        up: {
            auto: false, //是否在初始化时以上拉加载的方式自动加载第一页数据; 默认false
            isBounce: false, //此处禁止ios回弹,解析(务必认真阅读,特别是最后一点): http://www.mescroll.com/qa.html#q10
            callback: upCallback, //上拉回调,此处可简写; 相当于 callback: function (page) { upCallback(page); }
            /*toTop:{ //配置回到顶部按钮
                src : "../res/img/mescroll-totop.png", //默认滚动到1000px显示,可配置offset修改
                //offset : 1000
            }*/
        }
    });

    /*上拉加载的回调 */
    function upCallback() {
        if (pullUp == true) {
            getInviteDetail()
        } else {
            mescroll.endErr();
        }
    }


    //切换
    function tabComment(tab, that) {
        $(that).addClass('on').siblings('li').removeClass('on');
        if (tab == 1) {
            $('.love-list').hide().siblings(".comment-list").show();
            $(".screen-btn").show();
            stype = 1;
            page = 1;
            hot = 1;
            getInviteDetail()
        } else {
            $(".comment-list").hide().siblings('.love-list').show();
            $(".screen-btn").hide();
            stype = 2;
            page = 1;
            hot = 1;
            getInviteDetail()
        }
    }


    //排序
    function screen(that) {
        var _this = $(that);
        if (_this.html() == '按热度') {
            $(".screen-btn").html('按时间')
            hot = 2;
        } else {
            $(".screen-btn").html('按热度');
            hot = 1;
        }
        page = 1;
        getInviteDetail();
    }

    var videoUrl = '';
    var title = '';

    $(document).on('click', '#video_player', function () {
        play(videoUrl, title)
    })






    //详情
    function getInviteDetail() {

        var param = {
            token: $api.getStorage('token'),
            invitation_id: invitation_id,
            stype: stype,//类型：1显示评论 2显示喜欢
            hot: hot,//排序：1时间排序 2热度排序
            page: page,
        }
        getAjax(Interface.invitation_details, param, function (res) {
            console.log(jsonChange(res))
            var data = res.data.invitation;
            var shareData = res.data;
            if (isDefine(data)) {
                if (isDefine(data.member_id)) {
                    member_id = data.member_id;
                }

                shareTitle = data.title;

                circle_id = data.circle_id;
                title = data.title;

                $("#icon").css({background: 'url(' + ajaxUrl + data.member_path + ')'});
                $("#name").html(data.member_name);
                $("#title").html(data.title);
                $("#content").html(data.content);
                console.log(data.content);
                // baguetteBox.run('.detail');

                $("#content a").each(function () {
                    var _this = $(this);
                    if(_this.hasClass('a_img')){
                        _this.attr('href','javascript:void(0)');
                    }else {
                        var url = _this.attr('href');
                        _this.attr('href','javascript:void(0);');
                        _this.attr('onclick','toUrl("'+url+'")');
                    }


                })

                getPics();//获取图片

                $("#time").html(data.date);
                $("#hot").html(data.invitation_hot);

                //标签
                if (isDefine(data.circle_title)) {
                    $("#label").html('#'+data.circle_title+'#');
                }

                //是否关注
                if (data.member_follow == 0) {
                    $("#follow").removeClass('on');
                } else {
                    $("#follow").addClass('on');
                }
                //是否为自己
                if (isDefine(data.self_status)) {
                    if (data.self_status == 1) {
                        $("#follow").hide()
                    } else {
                        $("#follow").show()
                    }
                }

                if (isDefine(data.void_path)) {
                    var videoHtml = '<video class="video-js" preload="true" controls="false" data-setup="{}" src="'+ ajaxUrl + data.void_ids+'" poster="'+ ajaxUrl + data.void_icon_path +'"><source src="'+ ajaxUrl + data.void_ids+'" type="video/mp4" /></video>';
                    $('.contentVideo').html(videoHtml);

                    /*checkSystemType(function () {
                        //ios
                        $('.detail-video').html('<video style="width: 100%; height: 3.5rem;" src="' + ajaxUrl + data.void_ids + '" poster="' + ajaxUrl + data.void_icon_path + '"></video><span class="player-icon" id="video_player"></span>')
                        videoUrl = ajaxUrl + data.void_ids

                    },function () {
                        //android
                        var videoHtml = '<video id="video" style="width: 100%; height: 3.5rem;" poster="'+ ajaxUrl + data.void_icon_path +'">' +
                            '                <source src="'+ ajaxUrl + data.void_ids+'" type="video/mp4" />' +
                            // '                <source src="../../image/20190508110623.mp4" type="video/mp4" />' +
                            '            </video>'
                        $('.detail-video').html(videoHtml);
                        doZyMediaJs()

                    });*/

                    getVideoJs();
                }

                //分享封面图
                if (isDefine(shareData.share_img)) {
                    shareImg = ajaxUrl + shareData.share_img;
                }


                //徽章列表
                if (isDefine(data.badge_path)) {
                    var imgUrls = '';
                    for (var i = 0; i < data.badge_path.length; i++) {
                        imgUrls += '<dd class="icon"><img src="' + ajaxUrl + data.badge_path[i] + '" alt=""></dd>'
                    }
                    $("#badge").html(imgUrls)
                }


                //收藏
                $("#collect").html(data.collection_number)
                if (data.collect_status == 1) {
                    $("#collect").addClass('on')
                } else {
                    $("#collect").removeClass('on')
                }

                //点赞
                $("#love").html(data.fabulous_number)
                $("#loveNum").html(data.fabulous_number)
                if (data.fabulous_status == 1) {
                    $("#love").addClass('on')
                } else {
                    $("#love").removeClass('on')
                }

                //评论量
                $("#plNum").html(data.comment_number)
                $("#msg").html(data.comment_number)

                var comment = res.data.list.comment;
                if (stype == 1) {
                    var commentHtml = '';
                    if (isDefine(comment)) {
                        commentHtml = getEvaluteList(comment,invitation_id)
                        console.log(commentHtml)
                        if (page == 1) {
                            $("#commentHtml").html(commentHtml)
                        } else {
                            $("#commentHtml").append(commentHtml)
                        }
                        page++;
                        pullUp = true;
                        SystemCheckVersion()
                    } else {

                        if (page == 1) {
                            $("#commentHtml").html(noData)
                        }
                        pullUp = false;
                    }
                } else {
                    var list = res.data.list;
                    var listHtml = '';
                    if (isDefine(list)) {
                        for (var i = 0; i < list.length; i++) {
                            console.log(1)
                            var autograph = '';
                            if (list[i].autograph == '' || list[i].autograph == 0) {
                                autograph = commonNote;
                            } else {
                                autograph = list[i].autograph
                            }

                            var listBadge = '';
                            if (isDefine(list[i].badge_path)) {
                                for (var a = 0; a < list[i].badge_path.length; a++) {
                                    listBadge += '<dd class="icon"><img src="' + ajaxUrl + list[i].badge_path[a] + '" alt=""></dd>';
                                }
                            }


                            var userHtml = '';
                            userHtml = '<div class="user-info">' +
                                '            <div class="userRelative"><div class="user-icon bg-cover" style="background-image: url(' + ajaxUrl + list[i].icon_path + ');"></div><span class="vip"></span></div>' +
                                '                            <div class="info">' +
                                '                                <div class="name">' +
                                '                                    <h6>' + list[i].name + '</h6>' +
                                '                                    <dl class="badge-list" tapmode onclick="toBadgePage(event)">' + listBadge + '</dl>' +
                                '                                </div>' +
                                '                                <p class="sign-info single-ellipsis">' + autograph + '</p>' +
                                // '                                <span class="time">3分钟前</span>' +
                                '                            </div>' +
                                '                        </div>';


                            var param = '', mUrl = '';
                            var user_id = $api.getStorage('userInfo').id;
                            if (list[i].id == user_id) {
                                mUrl = '../member/member';
                            } else {
                                mUrl = '../activity/person_index';
                                param = {member_id: list[i].id}
                            }

                            listHtml += '<li><div class="common-user-detail" tapmode onclick=\'commonUrl("' + mUrl + '",' + jsonChange(param) + ')\'>' + userHtml + '</div></li>';

                        }
                        $("#sign_list").html(listHtml)
                    } else {
                        $("#sign_list").html(noData)
                    }


                }
            }

            mescroll.endErr()
            pop.close();
        }, function (error) {
            pop.notice(error.msg)
            pop.close();
            mescroll.endErr()
        })
    }



    var imagesArr = [];
    function getPics() {
        var swiperPic = '';
        $("#content img").each(function (index) {
            var _this  = $(this);
            var _thisSrc = _this.attr('src');
            _this.attr('index',index);
            imagesArr.push(_thisSrc);
            swiperPic +='<li class="swiper-slide" onclick="closeView()"><img onclick="showView(event)" class="swiper-lazy" src="'+ _thisSrc +'" alt=""><div class="swiper-lazy-preloader"></div></li>'
        })

        $("#swiperPic").html(swiperPic);

    }


    var _modelViewer = $(".photoViewer");
    var downloadPicUrl = '';
    var PicUrlArr = [];
    var index = 0;
    $("#content").on('click','img',function () {
        var _this  = $(this);
        index = _this.attr('index');
        downloadPicUrl = _this.attr('src');

        if(downloadPicUrl != '../../icon/loadimg.jpg' ){
            PicUrlArr[0] = downloadPicUrl;
            photoView.slideTo(index, 0, false);//切换到第一个slide，速度为1秒
            openView()
        }
    });

    var photoView = new Swiper('.photoViewer-swiper',{
        spaceBetween: 20,
        observer:true,
        observeParents:true,
        lazyLoading : true,
        pagination : '.swiper-pagination',
        paginationType : 'fraction',
        onSlideChangeStart: function(swiper){
            downloadPicUrl = imagesArr[swiper.activeIndex];
            PicUrlArr[0] = downloadPicUrl;
        }
    })


    function openView(){
        _modelViewer.show();
    }
    function closeView(){
        _modelViewer.hide();
    }
    function showView(event){

        event.stopPropagation();
        var UIPhotoViewer = api.require('UIPhotoViewer');
        UIPhotoViewer.open({
            images: PicUrlArr,
            activeIndex: 0,
            bgColor: '#000'
        }, function(ret, err) {
            if (ret) {
                if(ret.eventType =='click'){

                    // var UIPhotoViewer = api.require('UIPhotoViewer');
                    UIPhotoViewer.close();
                }
            } else {
            }
        });

    }

    function downloadPic(event) {
        event.stopPropagation();
        var timestamp = new Date().getTime();
        var pathArr = downloadPicUrl.split('.');
        var imgtypes = pathArr[pathArr.length - 1];
        api.download({
            url: downloadPicUrl,
            savePath: 'fs://test'+timestamp+'.'+imgtypes,
            report: true,
            cache: true,
            allowResume: true,
            networkTypes:"all"
        }, function(ret, err) {
            console.log(JSON.stringify(ret))
            if(ret.state==1){
                api.saveMediaToAlbum({
                    path: ret.savePath
                }, function(res, errs) {
                    console.log(JSON.stringify(res))
                    console.log(JSON.stringify(errs))
                    if(res.status ==true){
                        api.toast({
                            msg:'图片已保存到相册'
                        })
                    }else{
                        api.toast({
                            msg:'图片保存到相册失败'
                        })
                    }
                });
            }

        });

    }


    //添加收藏、取消收藏
    var toast = true

    function collect(that) {
        var _this = $(that);
        var pid = invitation_id;
        var type = 2;
        if (toast) {
            if (_this.hasClass('on')) {
                collection_cancel(type, pid, function (res) {
                    pop.notice('取消收藏')
                    _this.removeClass('on').html(parseInt(_this.html()) - 1)
                    pop.close()
                })
            } else {
                collection(type, pid, function (res) {
                    pop.notice('收藏成功')
                    _this.addClass('on').html(parseInt(_this.html()) + 1)
                    pop.close()
                })
            }
            toast = false;
            setTimeout(function () {
                toast = true;
            }, 1000)
        }

    }


    function personl_index(path) {
        var param = {"member_id": member_id};
        commonUrl(path, param)
    }

    //关注、取消关注
    function followAction(that) {
        var _this = $(that);
        var f_stype = '';
        if (_this.hasClass('on')) {
            f_stype = 2;
        } else {
            f_stype = 1;
        }
        var type = 1;//类型：1会员 2圈子
        follow(f_stype, type, member_id, function (res) {
            if (f_stype == 1) {
                pop.notice('关注成功')
                $(that).addClass('on')
            } else {
                pop.notice('已取消关注')
                $(that).removeClass('on')
            }
            api.sendEvent({
                name: 'invitation',
                extra: {}
            });
        })
    }


    //点赞或者取消点赞 类型type：1新闻 2帖子 3活动 4评论
    function clickFabulous(f_stype, type, pid,event) {
        event.stopPropagation()
        //活动点赞
        if (type == 2) {
            pid = invitation_id;
            if ($('#love').hasClass('on')) {
                f_stype = 2
            } else {
                f_stype = 1
            }
        }

        fabulous(f_stype, type, pid, function (res) {
            if (f_stype == 1) {
                pop.notice('点赞成功')
            } else {
                pop.notice('取消点赞')
            }
            setTimeout(function () {
                page = 1;
                getInviteDetail()
            }, 500)
        })
    }


    //开启弹窗
    function openModel() {
        _model.addClass('showModel');
        setTimeout(function () {
            _model.find('.action-view').addClass('showView');
        }, 10)
    }

    //阻止事件冒泡
    function stopModel(event) {
        event.stopPropagation();
    }

    //关闭弹窗
    function closeModel(event) {
        if (event) {
            event.stopPropagation();
        }
        _model.find('.action-view').removeClass('showView');
        setTimeout(function () {
            _model.removeClass('showModel');
        }, 500)
    }


    function copyLink() {
        var text = ajaxUrl + '/api/share/news?type=2&id=' + invitation_id;
        copy(text);
    }

    //scene:session（会话）timeline（朋友圈）favorite（收藏）
    //title:标题
    //thumb 图标
    //contentUrl 分享的地址

    //微信好友分享
    function shareWx() {
        var p = {
            apiKey: '',
            scene: 'session',
            title: shareTitle,
            thumb: 'widget://icon/logo.png',
            description:shareInfo,
            contentUrl: ajaxUrl + '/api/share/news?type=2&id=' + invitation_id,
        };
        wxpyqFX(p);
    }

    //朋友圈
    function shareWxq() {
        var p = {
            apiKey: '',
            scene: 'timeline',
            title: shareTitle,
            thumb: 'widget://icon/logo22.png',
            description:shareInfo,
            contentUrl: ajaxUrl + '/api/share/news?type=2&id=' + invitation_id,
        };
        wxpyqFX(p);
    }

    //qq好友
    function shareQq() {
        var p = {
            url: ajaxUrl + '/api/share/news?type=2&id=' + invitation_id,
            title: shareTitle,
            description: shareInfo,
            imgUrl: shareImg,
            type: 'QFriend'
        }
        qqfx(p);
    }

    //qq空间
    function shareQzone() {
        var p = {
            url: ajaxUrl + '/api/share/news?type=2&id=' + invitation_id,
            title: shareTitle,
            description: shareInfo,
            imgUrl: shareImg,
            type: 'QZone'
        }
        qqfx(p);
    }

    //微博
    function shareWb() {
        var p = {
            apiKey: '',
            scene: 'session',
            title: shareTitle,
            description: shareInfo,
            thumb: 'widget://icon/logo22.png',
            contentUrl: ajaxUrl + '/api/share/news?type=2&id=' + invitation_id,
        };
        weibo_authorize(p);
    }




</script>
